PHP Basics
first, the initial knowledge of PHPPHP is an embedded language used in combination with HTML.
1. PHP tags
Default tag
Short Mark
, you need to turn on the Short_open_tag option in php.ini short mark and other tags are not recommended
2,
PHP Magic Methods/Functions
Citation
http://blog.csdn.net/inqihoo/article/details/9235103
In PHP syntax, some of the system's own method names, which begin with a double underscore, are invoked under certain circumstances. The so-called magic
Object-Oriented ProgrammingObject-oriented programming (object oriented Programming,oop, object-oriented programming) is the main idea of the composition of the problem of the various transactions into various objects, the purpose of building
Transfer Value Assignment: When you assign the value of an expression to a variable, the value of the entire original expression is assigned to the target variable. This means that, for example, when a variable's value is assigned to another
The two days of learning polymorphism, nature involves the method of rewriting. In the author's blind use of code toss the process, found that the error type mentioned "This static method cannot hide the instance method from Fu" (such as), so that
One, Dbquery objectNow, our Dbquery object simply imitates a stored procedure-once executed, returns a result resource that must be saved, and if you want to use a function on the result set (such as num_rows () or Fetch_row ()), you must pass the
PHP Multi-inheritance is very confusing, and diamond of death two small middle large inheritance tree, so use trait substitution (clear, realize the reuse code, flattening the way more clear, resolved two semantics (need to execute what method or
1. Defining classesclass ren{public$name// define member variable var$sex; function Say () // definition method {echo "This person is speaking";}}2. Instantiation$ren New Ren (); // instantiation of $ren // Calling member variables $ren->sex=
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.